﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WsdShop.Model;
using WsdShop.Model.SearchModels.Activity;

namespace WsdShop.IService
{
    public interface IActivityRuleService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="search"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        IEnumerable<ActivityRule> GetActivityRuleList(ActivityRuleSearchModel search, ref int total);


        /// <summary>
        /// 获取规则信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        ActivityRule GetActivityRuleInfo(int id);


        /// <summary>
        /// 修改规则
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool EditActivityRule(Model.ActivityRule model);


        /// <summary>
        /// 增加规则
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int AddActivityRule(Model.ActivityRule model);


        /// <summary>
        /// 删除规则
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelActivityRule(int id);


        /// <summary>
        /// 获取所有规则
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<ActivityRule> GetActivityRuleAll(int type);
    }
}
